home *** CD-ROM | disk | FTP | other *** search
- extern void __regargs __autoopenfail(char *);
-
- #include <constructor.h>
- #include <proto/accounts.h>
-
- extern struct Library *OpenLibrary( UBYTE *libName, unsigned long version );
- extern void CloseLibrary( struct Library *library );
-
- struct Library *AccountsBase ;
- static void *libbase;
- extern long __netlibversion;
-
- CBMLIB_CONSTRUCTOR(openaccounts)
- {
- AccountsBase = libbase = (void *)OpenLibrary("accounts.library", __netlibversion);
- if (AccountsBase == NULL)
- {
- __autoopenfail("accounts.library");
- return 1;
- }
-
- return 0;
- }
-
- CBMLIB_DESTRUCTOR(closeaccounts)
- {
- if (libbase)
- {
- CloseLibrary((struct Library *)libbase);
- libbase = AccountsBase = NULL;
- }
- }
-